package com.javaex.book.controller;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.javaex.book.annotation.Controller;
import com.javaex.book.annotation.RequestMapping;
import com.javaex.book.utils.Pages;

@Controller("/manager")
public class ManagerController {
	
	private static final Logger logger = LoggerFactory.getLogger(ManagerController.class);
	
	/**
	 * 前往后台管理页面
	 * @return 页面路径
	 */
	@RequestMapping()
	public String toManager(HttpServletRequest req) {
		logger.info("前往后台管理界面");
		req.setAttribute("title", "后台管理");
		return Pages.MANAGER;
	}
}
